/*
 * @Author: loserjohn
 * @Date: 2022-11-05 16:18:35
 * @LastEditors: loserjohn
 * @LastEditTime: 2022-11-06 10:11:42
 * @Description: ---
 * @FilePath: \subsystem-template-v3\src\hooks\useMicro.js
 */

import { getCurrentInstance } from 'vue'


export const useMicroExample = () => {
  const currentInstance = getCurrentInstance()
  const { $microMode, $onGlobalStateChange, $setGlobalState } = currentInstance.appContext.config.globalProperties




  const res = reactive({
    ifMicroMode: $microMode || false,
    onGlobalStateChange: $onGlobalStateChange,
    setGlobalState: $setGlobalState
  })
  console.log('microMode123', $microMode, $onGlobalStateChange, $setGlobalState)
  return {
    ...res
  }
}


export const useMicro = useMicroExample


export default useMicroExample